import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 零售订单维护	查询订单数据	retail
export const queryRetailOrder = (params) => axios.get(`${SERVER.RETAIL}/vsRetailOrderArcfox/searchRetailOrder`, {
  params
});
export const queryProductCode = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/getInfo`, {
  params
});
// 零售订单维护	查询潜客	customerOldIntentLevel/potentialCustomerNameAndPhoneForRetail
// export const queryPotentialCustomer = (params) => axios.get(`${SERVER.CYXDMS_CLUE}/customerOldIntentLevel/potentialCustomerNameAndPhone`, {
//   params
// });

//  零售单查询潜客接口地址已改 beijing也需要改--刘诗文传达 2021-4-11 17:52:50
export const queryPotentialCustomer = (params) => axios.get(`${SERVER.CYXDMS_CLUE}/customerOldIntentLevel/potentialCustomerNameAndPhoneForRetail`, {
  params
});
// 零售订单维护	查询销售顾问
export const getEmployees = (params) => axios.get(`${SERVER.SYSMANAGE}/employeeNew/getEmployees`, {
  params
});

// 零售订单维护	查询车	retail
export const queryVinForOrder = (params) => axios.get(`${SERVER.RETAIL}/vsRetailOrder/searchVinForOrder`, {
  params
});

// 零售订单维护	保存订单（传id是更新）
export const saveOrder = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrderArcfox/saveOrder`, params)

// 零售订单维护	提交订单（传id是更新）
export const commitOrder = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrderArcfox/commitOrder`, params)

// 申请结束犹豫期
export const applyCloseTheDate = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrderArcfox/applicationEndHesitationPeriod`, params)

// 零售订单维护	根据id查询详情	retail
export const queryRetailOrderById = (Id) => axios.get(`${SERVER.RETAIL}/vsRetailOrderArcfox/searchRetailOrderById?id=${Id}`);

// 零售订单维护	取消订单	retail
export const cancleOrder = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrderArcfox/cancleOrder`, params)

// 零售订单维护	出库	retail
export const stockOut = (params) => axios.post(`${SERVER.RETAIL}/vsRetailOrderArcfox/stockOut`, params)
